The Equivalence Problem for Deterministic MSO Tree Transducers Is Decidable

نویسندگان

  • Joost Engelfriet
  • Sebastian Maneth
چکیده

It is decidable for deterministic MSO definable graph-to-string or graphto-tree transducers whether they are equivalent on a context-free set of graphs. It is well known that the equivalence problem for nondeterministic (one-way) finite state transducers is undecidable, even when they cannot read or write the empty string [Gri68]. In contrast, equivalence is decidable for deterministic finite state transducers, even for two-way transducers [Gur82]. The question arises whether these results can be generalized from strings to transducers working on more complex structures like, e.g., trees or graphs. There is no accepted notion of finite state transducer working on graphs; instead, it is believed that transductions expressed in monadic second-order logic (MSO) are the natural counterpart of finite state transductions on graphs. The idea is to define an output graph by interpreting fixed MSO formulas on a given input graph. In fact, if the input and output graphs of such an MSO graph transducer are strings, then the resulting transductions (in the deterministic case) are precisely the deterministic two-way finite state transductions [EH01]. Hence, by the above, equivalence is decidable for deterministic MSO string transducers. A nondeterministic MSO graph transducer can easily simulate a nondeterministic finite state transducer that cannot read the empty string; hence, equivalence is undecidable. Actually, even for deterministic MSO graph transducers equivalence is undecidable. This is due to the fact that MSO is undecidable for graphs (Propositions 5.21 and 5.2.2 of [Cou97]). The question remains whether deterministic MSO tree transducers have a decidable equivalence problem. Recently, these transducers have been characterized by certain attribute grammars [BE00] and macro tree transducers [EM99]. However, for both models it is unknown whether equivalence is decidable. Here we give an affirmative answer: equivalence of deterministic MSO tree transducers is decidable. This result has several applications; for instance, it implies that XML queries of linear size increase have decidable equivalence, by the results of [MSV03], [EM03a], [EM03b], and [Man03]. Our proof generalizes the one of [Gur82] (see also [Iba82]): it is based on the fact that certain sets are semilinear. The reader is assumed to be familiar with MSO on graphs and with MSO graph transducers, see, e.g., [Cou97,Cou94]. Convention: All lemmas stated in this paper are effective. A graph alphabet is a pair (Σ,Γ ) of alphabets of node and edge labels, respectively. A graph over (Σ,Γ ) is a tuple (V,E, λ) where V is the finite set of nodes, E ⊆ V × Γ × V is the set of edges, and λ : V → Σ is the node labeling function. The set of all graphs over (Σ,Γ ) is denoted GR(Σ,Γ ). The language MSO(Σ,Γ ) of monadic second-order (MSO) formulas over (Σ,Γ ) uses node variables x, y, . . . and node-set variablesX,Y, . . . ; both can be quantified with ∃ and ∀. It has atomic formulas labσ(x) for σ ∈ Σ, denoting that x is labeled σ, edgγ(x, y) for γ ∈ Γ , denoting that there is a γ-labeled edge from x to y, and x ∈ X denoting that x is in X . For g ∈ GR(Σ,Γ ) and a closed formula ψ in MSO(Σ,Γ ) we write g |= ψ if g satisfies ψ; similarly, if ψ has free variables x or x, y and u, v are nodes of g, then we write (g, u) |= ψ or (g, u, v) |= ψ if g satisfies ψ with x = u or with x = u, y = v, respectively. Let (Σ1, Γ1), (Σ2, Γ2) be graph alphabets. A deterministic MSO graph transducer M (from (Σ1, Γ1) to (Σ2, Γ2)) is a tuple (C,φdom, Ψ,X) whereC is a finite set of copy names, φdom ∈ MSO(Σ1, Γ1) is the closed domain formula, Ψ = {ψc,σ(x)}c∈C,σ∈Σ2 is a family of node formulas, i.e., MSO formulas ψc,σ(x) over (Σ1, Γ1) with one free variable x, and X = {χc,c′,γ(x, y)}c,c′∈C,γ∈Γ2 is a family of edge formulas, i.e., MSO formulas χc,c′,γ(x, y) over (Σ1, Γ1) with two free variables x, y. Given g ∈ GR(Σ1, Γ1), the graph h = τM (g) ∈ GR(Σ2, Γ2) is defined if g |= φdom, and then Vh = {(c, u) | c ∈ C, u ∈ Vg , there is exactly one σ ∈ Σ2 such that (g, u) |= ψc,σ(x)}, Eh = {((c, u), γ, (c, u)) | (c, u), (c, u) ∈ Vh, γ ∈ Γ2, and (g, u, u) |= χc,c′,γ(x, y)}, and λh = {((c, u), σ) | (c, u) ∈ Vh, σ ∈ Σ2, and (g, u) |= ψc,σ(x)}. Hence, τM is a partial function from GR(Σ1, Γ1) to GR(Σ2, Γ2) with dom(τM ) = {g ∈ GR(Σ1, Γ1) | g |= φdom}. A (nondeterministic) MSO graph transducer is obtained from a deterministic one by allowing all formulas to use fixed free node-set variables Y1, Y2, . . . , called parameters. For each valuation of the parameters (by sets of nodes of the input graph) that satisfies the domain formula, the other formulas define the output graph as before. Hence each such valuation may lead to a different output graph for the given input graph. Thus, τM ⊆ GR(Σ1, Γ1) × GR(Σ2, Γ2). The following lemma contains a basic fact about MSO definable graph transductions; see, e.g., Proposition 3.2 in [Cou94]. Lemma 1. The (deterministic) MSO graph transductions are closed under composition. Notation. LetM1;M2 denote a transducerM for which τM = τM2 ◦ τM1 ; note that M is deterministic, if M1 and M2 are. By Lemma 1, M1;M2 effectively exists. In the sequel we often identify a transducerM with its transduction τM , and simply write, e.g., M(g) in place of τM (g). Let M be an MSO graph transducer and let X,Y be sets of graphs. Then M is called an MSO X-to-Y transducer, if dom(M) ⊆ X and range(M) ⊆ Y , and it is an MSO X transducer if additionally Y = X . A discrete graph (dgraph, for short) is a graph without edges. Let g be a dgraph over (Σ,∅) with Σ = {σ1, . . . , σk}. Define Par(g) as the vector (n1, . . . , nk) in N such that, for 1 ≤ i ≤ k, ni is the number of σi-labeled nodes in g. Similarly, for a string w ∈ Σ, Par(w) is the vector in N such that the i-th component is the number of σi’s in w. We denote by dgr(w) the (unique) dgraph g such that Par(g) = Par(w). For a set S of dgraphs or strings, Par(S) is the set of all Par(g) for g ∈ S. A set P ⊆ N is semilinear if there exists a regular language R such that P = Par(R). The set S is Parikh if Par(S) is semilinear. Note that since Par(R) = ∅ iff R = ∅, emptiness of semilinear sets is decidable.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Decision Problems of Tree Transducers with Origin

A tree transducer with origin translates an input tree into a pair of output tree and origin info. The origin info maps each node in the output tree to the unique input node that created it. In this way, the implementation of the transducer becomes part of its semantics. We show that the landscape of decidable properties changes drastically when origin info is added. For instance, equivalence o...

متن کامل

On Streaming String Transducers and HDT0L Systems

Copyless streaming string transducers (copyless SST) have been introduced by R. Alur and P. Cerny in 2010 as a one-way deterministic automata model to define transformations of finite strings. Copyless SST extend deterministic finite state automata with a set of registers in which to store intermediate output strings, and those registers can be combined and updated all along the run, in a linea...

متن کامل

Equivalence Problems for Tree Transducers: A Brief Survey

The decidability of equivalence for three important classes of tree transducers is discussed. Each class can be obtained as a natural restriction of deterministic macro tree transducers (MTTs): (1) no context parameters, i.e., top-down tree transducers, (2) linear size increase, i.e., MSO definable tree transducers, and (3) monadic input and output ranked alphabets. For the full class of MTTs, ...

متن کامل

Determinacy and Rewriting of Top-Down and MSO Tree Transformations

A query is determined by a view, if the result to the query can be reconstructed from the result of the view. We consider the problem of deciding for two given tree transformations, whether one is determined by the other. If the view transformation is induced by a tree transducer that may copy, then determinacy is undecidable, even for identity queries. For a large class of non-copying views, n...

متن کامل

Uniformization Problems for Tree-Automatic Relations and Top-Down Tree Transducers

For a given binary relation of finite trees, we consider the synthesis problem of deciding whether there is a deterministic top-down tree transducer that uniformizes the relation, and constructing such a transducer if it exists. A uniformization of a relation is a function that is contained in the relation and has the same domain as the relation. It is known that this problem is decidable if th...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Inf. Process. Lett.

دوره 100  شماره 

صفحات  -

تاریخ انتشار 2005